from pydantic import BaseModel
from typing import Optional
from datetime import datetime

class SessionOut(BaseModel):
    id: int
    user_id: int
    title: Optional[str]
    created_at: datetime
    updated_at: datetime

    class Config:
        orm_mode = True

class MessageOut(BaseModel):
    id: int
    session_id: int
    sender: str
    content: str
    created_at: datetime

    class Config:
        orm_mode = True
